package pub.cleangao.memm.registry;


import lombok.Getter;

@Getter
public enum RegistryType {

    NONE("none"),
    ZOOKEEPER("zookeeper"),
    ETCD("etcd"),
    REDIS("redis");

    RegistryType(String type) {
        this.type = type;
    }

    private final String type;

    public static RegistryType from(String type) {
        for (RegistryType registryType : RegistryType.values()) {
            if (registryType.getType().equals(type)) {
                return registryType;
            }
        }
        return null;
    }

}
